package com.dropdb.demo.service.impl;

import com.dropdb.demo.bean.Region;
import com.dropdb.demo.bean.RegionExample;
import com.dropdb.demo.mapper.RegionMapper;
import com.dropdb.demo.service.WxRegionService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author:cheyanjun
 * @date:2020/07/01 04:08
 */
@Service
public class WxRegionServiceImpl implements WxRegionService {
    @Autowired
    RegionMapper regionMapper;

    @Override
    public List<Region> getRegionList(Integer pid) {
        RegionExample regionExample = new RegionExample();
        regionExample.createCriteria().andPidEqualTo(pid);
        List<Region> regions = regionMapper.selectByExample(regionExample);
        return regions;
    }
}
